package com.aco.party.enums;

/**
 * Created by WangShijun on 2016/3/3.
 */
public enum EventStatusEnum {
    正在进行中(1,"正在进行中"),
    已结束(2,"已结束"),
    NULL(0,"");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    EventStatusEnum(int value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public static EventStatusEnum getEventStatus(int value){
        for (EventStatusEnum type : EventStatusEnum.values()) {
            if(type.value == value)
                return type;
        }
        return NULL;
    }
}
